﻿// build.jsfl:

var doc = fl.getDocumentDOM();

if (doc == null)

{
   fl.trace("No documents open");
}

else

{
   doc.save();
   doc.publish();
}